package com.JohnCarloSalter.BackEnd;


public class Orders {
	//Orders are stored only by their integer item numbers.
	//In other words, if the contents of "orders" are [0, 3, 2], then 
	//the customer ordered the zeroth, third, and second items on the menu.
	private int[] orders;
	
	public Orders() {
		orders = new int[0];
	}
	
	public Orders(int[] o) {
		orders = o;
	}
	
	//Getter
	public int getNumberOfOrders() { return orders.length; }
	public int getOrder(int index) { return orders[index]; }
	
	//Adders
	//Appends an order to the end of the orders list.
	public void addOrder(int orderNumber) {
		int[] temp = new int[orders.length + 1];
		for(int i=0; i<orders.length; i++) {
			temp[i] = orders[i];
		}
		temp[orders.length] = orderNumber;
		orders = temp;
	}
}
